A Line chart with highlights based on the X mouse coordinate
This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.common.dynamic.js"></script>
<script src="RGraph.common.tooltips.js"></script>
<script src="RGraph.bar.js"></script>
Put this where you want the chart to show up:
<canvas id="cvs" width="600" height="250">
[No canvas support]
</canvas>
This is the code that generates the chart:
<script>
window.onload = function ()
{
var line = new RGraph.Line({
id: 'cvs',
data: [4,5,5,8,8,7,8,9,8,11,13,13,12,14,15,15,17,18,18,17,17],
options: {
tooltips: function () {return "\0";},
tooltipsHotspotXonly: true,
numxticks: 6,
gutterLeft: 30,
gutterRight: 30,
labels: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'],
textAccessible: true
}
}).draw();
};
</script>